package cn.enjoy.design.create.factory.abstractFactory.factory;

/**
 * @author K
 * @date 2021/5/22 下午4:43
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("SHAPE")){
            return new ShapeFactory();
        } else if(choice.equalsIgnoreCase("COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
